﻿using System;

namespace SimbaRGVMonitor.Common.Diagnostics
{
    [Serializable]
    public sealed class MonitorLoggerWritedEventArgs : EventArgs
    {
        internal MonitorLoggerWritedEventArgs(string name, DateTime writeTime, LogLevel writeLevel, string writeMessage)
        {
            this.name = name;
            this.writeTime = writeTime;
            this.writeLevel = writeLevel;
            this.writeMessage = writeMessage;
        }

        //====================================================================================================
        //以上是类型构造函数
        //----------------------------------------------------------------------------------------------------
        //以下是类型字段
        //====================================================================================================

        private readonly string name;
        private readonly DateTime writeTime;
        private readonly LogLevel writeLevel;
        private readonly string writeMessage;

        //====================================================================================================
        //以上是类型字段
        //----------------------------------------------------------------------------------------------------
        //以下是类型属性
        //====================================================================================================

        public string Name
        {
            get { return name; }
        }
        
        public DateTime WriteTime
        {
            get { return writeTime; }
        }

        public LogLevel WriteLevel
        {
            get { return writeLevel; }
        }

        public string WriteMessage
        {
            get { return writeMessage; }
        }
    }
}
